#pragma once

#include "Singleton.h"
#include "Camera2D.h"
#include "Quad.h"

namespace a2d
{
//------------------------------------------------------------------

	struct EngineDesc;

	class Render : public Singleton<Render>
	{
	public:
		Render(const EngineDesc &desc);
		bool Init();
		void BeginFrame();
		void EngFrame();
		void Destroy();

		void Resize(ushort w, ushort h);		

		bool IsResize() { return m_isresize; }

		Quad& GetDefQuad() { return m_defquad; }

	protected:
		const EngineDesc &m_desc;
				
		Camera2D m_cam;
		Quad m_defquad;

		bool m_isresize = false;

	};

//------------------------------------------------------------------
} // namespace a2d
